

{% extends 'admin/admin_nav.html' %}
{% block head %}
    <title>添加新闻</title>
{% endblock %}
{% block content %}

    <!-- 添加新闻内容 -->
    <form action="/admin/do_add/" method="post">
        <div class="form-group">
            <label for="exampleInputEmail1">{{ form.title.label.text }}</label>
            <input type="text" name="title" class="form-control" id="exampleInputEmail1" placeholder="标题">
        </div>
        <div class="form-group">
            <label for="exampleInputEmail1">{{ form.author.label.text }}</label>
            <input type="text" name="author" class="form-control" id="exampleInputEmail1" placeholder="作者笔名">
        </div>
        <div class="form-group">
            <label for="exampleInputPassword1">{{ form.types.label.text }}</label>
            <div>
                {{ form.types }}
            </div>
        </div>
        <div class="form-group">
            <label for="exampleInputFile">{{ form.image.label.text }}</label>
            <input type="file" name="image" id="exampleInputFile">
            <p class="help-block">新闻图片上传</p>
        </div>
        <div class="form-group">
            {{ form.content }}
        </div>
        <br>
        {{ form.csrf_token }}
        {{ form.submit }}
    </form>
{% endblock %}
</body>
</html>

